Particular embodiments generally relate to transcoding, and more particularly to determining sub-block sizes in a transcoding process.
Transcoding involves the digital-to-digital conversion from one format of video sequence to another format of video sequence. For example, transcoding may be performed for a motion pictures expert group (MPEG)-2 bitstream to an advanced video coding (AVC) bitstream. Transcoding typically involves decoding/decompressing the MPEG-2 bitstream and then re-encoding it using an AVC encoder into an AVC bitstream. This is a cascaded process and involves decoding and encoding and is very complex.
In the transcoding process, motion estimation needs to be performed. Motion estimation describes a picture in terms of where each section of that picture came from in a previous picture. For example, each block is predicted from a block of equal size in a reference frame. The blocks are shifted to a position of a predicted block and the shift is represented by a motion vector.
In MPEG-2, a macroblock is a fixed size 16×16 macroblock with a motion vector. AVC, however, may use variable sized macroblocks. For example, the variable sized blocks may be 4×4, 4×8, 4×16, . . . , 16×16. Accordingly, for each variable sized block, a motion vector may be calculated. The best variable block size is then chosen. Performing the motion vector calculation for each variable sized block is very computationally expensive.